<script>
	$(function() {
		$( "#txtNgaytrienlam" ).datepicker();
	});
</script>

<?php
if (!defined('WEB_ROOT')) {
	exit;
}
$nganh_id = (isset($_GET['nganh_id']) && $_GET['nganh_id'] > 0) ? $_GET['nganh_id'] : 0;

$branchList = buildBranchOptions($nganh_id);
?> 
<div class="onecolumn">
				<div class="header">
					<span>Thêm giáo trình - tài liệu</span>
				</div>
				<br class="clear"/>
				<div class="content">
					<form action="processBook.php?action=addBook" method="post" enctype="multipart/form-data" name="frmAddBook" id="frmAddBook">
					  <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
					  <tr> 
						   <td width="300" class="label">Mã giáo trình - tài liệu</td>
						   <td colspan="5" class="content"> <input name="txtMasach" type="text" class="box" id="txtMasach" size="20" maxlength="20"></td>
					  </tr>
					  <tr> 
						   <td width="237" class="label">Tên giáo trình - tài liệu</td>
						   <td colspan="5" class="content"> <input name="txtTensach" type="text" class="box" id="txtTensach" size="101" maxlength="101"></td>
					  </tr>
					  <tr> 
						   <td width="237" class="label">Năm xuất bản</td>
						   <td width="60" class="content"><input name="txtNamxb" type="text" id="txtNamxb" size="10" maxlength="10" class="box"> </td>
						   <td width="166" class="label">Nhà xuất bản </td>
						   <td colspan="3" class="content"><input name="txtNhaxb" type="text" id="txtNhaxb" size="66" maxlength="100" class="box" /></td>
					  </tr>
						<tr> 
						   <td width="237" class="label">Hình ảnh</td>
						   <td colspan="5" class="content"> <input name="fleImage" type="file" id="fleImage" class="box"> </td>
					  </tr>
					  <tr>
							<td width = "237" class="label">Số trang</td>  
							<td class="content"><input name="txtSotrang" type="text" id="txtSotrang" size="10" maxlength="10" class="box"> </td>
						   <td class="label">Kích thước </td>
						   <td width="102" class="content"><input name="txtKichthuoc" type="text" id="txtKichthuoc" size="15" maxlength="15" class="box" /></td>
						   <td width="189" class="label">Trọng lượng </td>
						   <td width="496" class="content"><input name="txtTrongluong" type="text" id="txtTrongluong" size="10" maxlength="10" class="box" /></td>
					 </tr>
					  <tr> 
						   <td width="237" class="label">Số lượng</td>
						   <td colspan="3" class="content"><input name="txtSoluong" type="text" id="txtSoluong" size="40" maxlength="40" class="box"> </td>
						   <td class="label">Số lần tái bản </td>
						   <td class="content"><input name="txtSolantaiban" type="text" id="txtSolantaiban" size="10" maxlength="10" class="box" /></td>
					  </tr>
					  <tr> 
						   <td width="237" class="label">Ngành</td>
						   <td colspan="5" class="content"> <select name="cboBranch" id="cboDept" class="box">
							<option value="" selected>-- Chọn ngành --</option>
								<?php
									echo $branchList;
								?>	 
						</select>  </tr>
					 </table>
					 <p align="center"> 
					  <input name="btnAddBook" type="button" id="btnAddBook" value="Thêm giáo trình - tài liệu" onClick="checkAddBookForm();" class="box">
					  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value=" Hủy " onClick="window.location.href='index.php';" class="box">  
					 </p>
					</form>
</div>
</div>